package com.example.mybaiduweishi.activity;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.example.mybaiduweishi.R;
import com.example.mybaiduweishi.activity.base.BaseActivity;
import com.example.mybaiduweishi.db.AddressDao;
import com.example.mybaiduweishi.fragments.ShowContactsFragment;
import com.example.mybaiduweishi.utils.MyUtil;
import com.example.mybaiduweishi.vo.Contacts;

import java.util.HashMap;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

public class InsertContactsActivity extends BaseActivity {

    @BindView(R.id.contacts_OK)
    Button contactsOK;
    @BindView(R.id.edit_select_address)
    EditText editText;


    private ShowContactsFragment showContactsFragment = null;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        toolContactInsert.setTitle("");
//        setSupportActionBar(toolContactInsert);
        initData();
    }


    @Override
    public int getContentXML() {
        return R.layout.activity_insert_contacts;
    }

    @Override
    public void initData() {
        //由内容提供者查询联系人
        if (showContactsFragment == null){
            showContactsFragment = new ShowContactsFragment();
            getFragmentManager().beginTransaction()
                    .replace(R.id.f1_show_contact,showContactsFragment)
                    .addToBackStack("mobile")
                    .commit();
        }
    }

        @Override
        public void initView() {

        }

        @OnClick({R.id.contacts_OK, R.id.tool_contact_insert, R.id.img_inser_back})
        public void onViewClicked(View view) {
            switch (view.getId()) {
                case R.id.contacts_OK:
                    break;
                case R.id.tool_contact_insert:
                    break;
                case R.id.img_inser_back:
                    finish();
                    break;
            }
        }

    }

